//
//  ZQLPushManager.h
//  MLX
//
//  Created by SY on 2018/12/4.
//  Copyright © 2018年 SY. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, MLXApplicationState) {
    MLXApplicationStateForegroundActive,//正在前台活动
    MLXApplicationStateInactiveAction,//正在后台台活动
    MLXApplicationStateForegroundStartAction//App刚刚启动
    
};


@interface MLXPushManager : NSObject

@property (nonatomic,assign) BOOL justInBack;
@property (nonatomic,assign) BOOL clickNotification;
+ (MLXPushManager *)shareManager;

/// 配置推送
+ (void)configurePushWithOptions:(NSDictionary*)launchOptions PushKey:(NSString *)pushKey applicationReceiveRemoteNotificationBlcok:(void(^)(NSDictionary *userInfo,MLXApplicationState applicationState))applicationReceiveRemoteNotificationBlcok;

///注册token
+ (void)registerDeviceToken:(NSData *)deviceToken;
/// 设置tag和标签
+ (void)setTagsAndAlias:(NSSet<NSString *> *)tags completion:(void(^)(NSInteger iResCode, NSSet *iTags, NSInteger seq))completion  userName:(NSString *)userName;
/// 操作收到的远程消息
+ (void)handleRemoteNotification:(NSDictionary*)notification;

/// 远程消息操作完成
+ (void)handleRemoteNotification:(NSDictionary*)notification fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;

///处理远程通知转化而来的本地通知
+ (void)handleLocalNotificationForRemotePush:(UILocalNotification*)notification;

/// 处理消息内容
+ (void)clickRemoteNotification:(NSDictionary*)notification;

///清理角标
+ (void)clearBadge;

///是否开启了允许通知
+ (BOOL)isOpenRemoteNotification;

///取消注册通知
+ (void)unregisterRemoteNotifications;

@end
